﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GravityScript : MonoBehaviour
{
    public Transform target;

    // Update is called once per frame
    void Update()
    {
        Vector3 relativePos = (target.position + new Vector3(0, 0.5f, 0)) - transform.position;
        //Quaternion quaternion = Quaternion.LookRotation(relativePos);
        //Quaternion curreny = transform.localRotation;
        //Quaternion rotation = Quaternion.Lerp(curreny, quaternion, Time.deltaTime);
        //transform.localRotation = rotation;
        //transform.Translate(transform.forward*Time.deltaTime*3,Space.World);
        transform.RotateAround(target.position, Vector3.up, 1);
    }
}
